﻿using System.Data.Entity.ModelConfiguration;
using Nop.Core.Domain.Coffee;

namespace Nop.Data.Mapping.Coffee
{
    public partial class BlendBeanMap : EntityTypeConfiguration<BlendBean>
    {
        public BlendBeanMap() 
        {
            this.ToTable("EcrBlendBeanMap");
            this.HasKey(bbm => bbm.Id);
            this.HasRequired(bbm => bbm.Blend)
                .WithMany(b => b.BlendBeans)
                .HasForeignKey(bbm => bbm.BlendId);
            this.HasRequired(bbm => bbm.Bean)
                .WithMany(b => b.BlendBeans)
                .HasForeignKey(bbm => bbm.BeanId);

        }
    }
}
